cmake_minimum_required(VERSION 3.20)

project(test_dependency LANGUAGES CXX)

# main2先生成 main1再生成
add_executable(main1 main.cpp)
add_dependencies(main1 main2)
add_executable(main2 main.cpp)